Skip to content

solana: pin builder-stake's bytes, for both networks - #4306

Merged
bgm-malbeclabs merged 1 commit into
mainfrom
feat/pin-builder-stake-bytes
Sep 9, 2026
Merged

solana: pin builder-stake's bytes, for both networks#4306
bgm-malbeclabs merged 1 commit into
mainfrom
feat/pin-builder-stake-bytes

Conversation

@bgm-malbeclabs

Copy link
Copy Markdown
Contributor

Two lines, one per checksum file. They close a hole that has been open since builder-stake landed.

What was wrong

make verify-checksums runs shasum -a 256 -c programs/sha256sums_<network>.txt, and shasum -c checks only the files the list names. Neither list named builder-stake:

$ cat solana/programs/sha256sums_development.txt
ebfa65...  artifacts-development/doublezero_passport.so
ec0407...  artifacts-development/doublezero_revenue_distribution.so

The Dockerfile builds all three programs and exports target/deploy/*.so, so the artifact was produced on every run and then ignored. solana.yml has been running make build-checked-artifacts for both networks on every change, reporting OK, and pinning nothing about this program's bytes.

Why it mattered today

The bytes first deployed to Solana devnet came from a local toolchain rather than the pinned Rust 1.91 and Solana v3.0.12 in the Dockerfile. They were 9kb larger and hashed differently:

sha256 size
Reproducible artifact 98faedb2... 184768
First deployed d7f51884... 193800

Nothing would have reported that. Devnet has since been upgraded to the artifact.

Testing Verification

  • make verify-checksums passes for development and mainnet-beta, all three programs each, against artifacts built by make build-artifacts in Docker.

  • Flipping one byte of the builder-stake artifact makes it fail:

    artifacts-development/doublezero_builder_stake.so: FAILED
    shasum: WARNING: 1 computed checksum did NOT match
    

    Restoring the byte makes it pass again. The first attempt at this wrote a zero over a byte that was already zero and reported OK, which is a reminder that a negative check needs checking too.

  • The devnet program is the artifact. solana program dump returns 193800 bytes because an upgrade does not shrink the data account; its first 184768 bytes are byte-identical to artifacts-development/doublezero_builder_stake.so and the remainder is zero.

The mainnet-beta line is the reproducible hash for that build. Nothing is deployed there.

Neither checksum file listed `builder-stake`, and `shasum -c` checks only the
files it names, so `make verify-checksums` passed on every change while
pinning nothing about this program. The other two programs were covered from
the day they landed; this one was added and never added to the list.

That is not theoretical. The bytes first deployed to Solana devnet came from
a local toolchain and were 9kb larger than the reproducible build, and
nothing would have said so. Devnet now runs the artifact: its first 184768
bytes match this checksum exactly, and the rest is the zero padding an
upgrade leaves behind when it does not shrink the data account.

Verified by flipping one byte of the artifact and watching the check fail.
@bgm-malbeclabs
bgm-malbeclabs requested review from a team and a lite review from Copilot September 9, 2026 22:25

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

The checksum files now include the previously unpinned builder-stake artifact for both networks, which aligns with the stated verification behavior and introduces no functional code-path risk.

Pull request overview

This pull request closes a reproducible-build verification gap in the Solana build pipeline by adding builder-stake to the checksum allowlists so make verify-checksums actually pins its produced .so bytes for both supported networks.

Changes:

  • Add doublezero_builder_stake.so entries to the development and mainnet-beta checksum lists used by shasum -c.
  • Document the checksum coverage fix in CHANGELOG.md.
File summaries
File Description
solana/programs/sha256sums_mainnet_beta.txt Adds the pinned sha256 for artifacts-mainnet-beta/doublezero_builder_stake.so so verification covers it.
solana/programs/sha256sums_development.txt Adds the pinned sha256 for artifacts-development/doublezero_builder_stake.so so verification covers it.
CHANGELOG.md Records that builder-stake is now included in reproducible-build checksum verification.
Review details
  • Files reviewed: 3/3 changed files
  • Comments generated: 0
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@bgm-malbeclabs
bgm-malbeclabs enabled auto-merge (squash) September 9, 2026 22:42
@bgm-malbeclabs
bgm-malbeclabs merged commit 94f33d4 into main Sep 9, 2026
48 checks passed
@bgm-malbeclabs
bgm-malbeclabs deleted the feat/pin-builder-stake-bytes branch September 9, 2026 22:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants